import { Navigate } from 'react-router'
import { lazy } from 'react'

//登录页面
const Login = lazy(() => import('../page/login'))
//主页面
const Main = lazy(() => import('../page/main'))
//案件推送
const PushCase = lazy(() => import('../page/pushCase'))
//测试页面
const Test2 = lazy(() => import('../page/test2'))

const element = [
	{
		path: 'login',
		element: <Login />
	},
	{
		path: 'main',
		element: <Main />,
		children: [
			{
				path: 'pushCase',
				element: <PushCase />
			},
			{
				path: 'test2',
				element: <Test2 />
			},
		],
	},

	{
		path: '/',
		element: <Navigate to='login' />
	}
]


export default element;
